//
//  Auction_MainCellHeaderTitle_View_WX.m
//  ZITHER
//
//  Created by weixin on 2019/5/28.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Auction_MainCellHeaderTitle_View_WX.h"

@implementation Auction_MainCellHeaderTitle_View_WX

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self setCornerRadiusWithRadius:10 isMasks:YES];
        [self setUI];
    }
    return self;
}
-(void)setUI{
    BaseLab * titleLab1 = [BaseLab initCustomLab:@"买表询价" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFangSC-Semibold" size:17]];
    titleLab1.textAlignment = NSTextAlignmentCenter;
    [self addSubview:titleLab1];
    [titleLab1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(0);
        make.top.equalTo(self).offset(20);
        make.width.mas_equalTo((kScreenW-30)/2.0);
        make.height.mas_equalTo(20);
    }];
    
    BaseLab * titleSubLab1 = [BaseLab initCustomLab:@"商家在线报价" color:HexColor(0x666666) font:[UIFont fontWithName:@"PingFangSC-Semibold" size:12]];
    titleSubLab1.textAlignment = NSTextAlignmentCenter;

    [self addSubview:titleSubLab1];
    [titleSubLab1 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(0);
        make.top.equalTo(titleLab1.mas_bottom).offset(8);
        make.width.mas_equalTo((kScreenW-30)/2.0);
        make.height.mas_equalTo(12);
    }];
                          
                          

    BaseLab * titleLab2= [BaseLab initCustomLab:@"买表询价" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFangSC-Semibold" size:17]];
    titleLab2.textAlignment = NSTextAlignmentCenter;

    [self addSubview:titleLab2];
    [titleLab2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).offset(0);
        make.top.equalTo(self).offset(20);
        make.width.mas_equalTo((kScreenW-30)/2.0);
        make.height.mas_equalTo(20);
    }];
    
    BaseLab * titleSubLab2 = [BaseLab initCustomLab:@"商家在线报价" color:HexColor(0x666666) font:[UIFont fontWithName:@"PingFangSC-Semibold" size:12]];
    titleSubLab2.textAlignment = NSTextAlignmentCenter;
    [self addSubview:titleSubLab2];
    [titleSubLab2 mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).offset(0);
        make.top.equalTo(titleLab2.mas_bottom).offset(8);
        make.width.mas_equalTo((kScreenW-30)/2.0);
        make.height.mas_equalTo(12);
    }];
    
    BaseView * line = [[BaseView alloc]initWithFrame:CGRectZero];
    line.backgroundColor = HexColor(0xEEEEEE);
    [self addSubview:line];
    [line mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self).offset(0);
        make.top.equalTo(self).offset(16);
        make.bottom.equalTo(self).offset(-16);

        make.width.mas_equalTo(1);
    }];
}
@end
